package cn.yaboya.controller;


import cn.yaboya.domain.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: Eric
 * @CreateTime: 2022-07-27  16:51
 * @Description: user controller
 */


@RestController
public class UserController {

    @Value("${server.port}")
    private int port;



    @GetMapping("/getUserById/{id}")
    public User getUserById(@PathVariable Long id){
        //通过id  到数据库查询指定的用户的信息

        return User.builder().id(id).username("zs").desc("我是zs"+port).build();
    }

}